perm filename USEMUS.LCS[UP,DOC]3 blob sn#166191 filedate 1975-07-01 generic text, type T, neo UTF8
00200	**********  Using the Music System -- MUS10  **********
00300	
00400	******* WORK IN PROGRESS -- JUNE 75 -- LELAND SMITH *********
00500	
00600	This manual is designed for use with the PDP10 at the Stanford AI lab.
00700	It  is  quite  possible  that  several features discussed will not be
00800	operative on other installations.  See appendix for some details.
00900	
01000	
01100	MUS10 is a complete sound generating  package  which  exists  on  the
01200	disk. In its basic form it includes no storage area for sound output,
01300	so when the program is to be run, a  number,  establishing  the  core
01400	size, must be given following the program name.
01500	
01600	For first attempts type:
01700	
01800		R MUS10 10	
01900		(All lines must be terminated with the 'RETURN' key.)
02000	
02100	At this point the program will type the message:
02200	
02300		INPUT?
02400	
02500	Basically  there  are  two responses possible.   If the program is to
02600	receive  further  instructions  from  another  file  which  has  been
02700	prepared with an editing program, type:
02800	
02900		NAME -- where NAME is the name of the file to be read.
03000				(If NAME has an extension, it must be used!)
03100	
03200	If instructions are to be entered by means of the  teletype  keyboard
03300	(TTY mode), type carriage return (<CR>).
03400	
03500	At  this  point  a  star  (*)  will appear which means the program is
03600	awaiting input.
03700	
03800	Most complete statements  to  be  read  by  MUS10  must  end  with  a
03900	semicolon.  Several  complete  statements  may be entered on a single
04000	line but it is best not to have the lines too long.   More  than  one
04100	line  may  be used for a single statement.  If the less-than sign (<)
04200	appears everything following on that line will be ignored.  Use  this
04300	for entering comments.
04400	
04500	   	*****  Note  that  the above rules DO NOT apply to the syntax
04600		of the SCORE program.
04700	
04800	Already  present  in MUS10 is an "instrument" known as SIMP which has
04900	been set to play a test tone of 'A' (440 hz) for 1/2 second.
05000	
05100	In  order  to  play  this  tone, first get into TTY mode as described
05200	above, then type:
05300	
05400		PLAY;SIMP;FINISH;
05500	
05600	When the computation has finished the note 'A' will be heard  if  the
05700	various  switches on the sound system are all in the right positions.
05800	(See appendix for this  information  and  information  regarding  the
05900	filter settings.)
06000	
06100	Assuming  there were no typographical errors, you will know the comp-
06200	utation is done by the appearance of another star (*).  The test tone
06300	may now be repeated several times by typing:
06400	
06500		$P N where '$' indicates the 'ALT' key and 'N' is the
06600			number of times the note will play.
06700	
06800	If no sound has been heard up to this point repeat the  above,  using
06900	some  large number (e.g.20) for  'N' and go test the various switches
07000	until the tones are heard.
07100	
07200	Occasionally a message will appear:
07300	
07400		HUNG DEVICE AD
07500	
07600	If this happens get expert help.
07700	
07800	******************************************************
07900	
08000	The instrument SIMP has five parameters.
08100	
08200		P1 = begin time of note (in seconds)
08300		P2 = duration of note     "     "
08400		P3 = pitch
08500		P4 = amplitude
08600		P5 = wave form (or timbre)
08700	
08800	P1 and P2 will have the same significance in all instruments but  all
08900	higher   numbered   parameters   are  assigned   roles  according  to
09000	convenience.  (However it will prove useful to consistently apply  P3
09100	and P4 as above.)
09200	
09300	Internally all pitch entries become  numerical,  however  the  twelve
09400	frequencies  of  the  tempered chromatic scale, from middle C (261.62
09500	hz) up to B may be used in MUS10 by typing the letter  names  of  the
09600	notes. The letter S = #; flats are not used in this program.
09700	
09800	Since these letters merely represent the  frequencies of  each  note,
09900	the  octave range may be changed multiplying or dividing by multiples
10000	of two.   Thus C or A in the octave below middle C would  be  entered
10100	as  C/2  or  A/2.   In the octave above the basic middle octave these
10200	notes would be C*2 or A*2.
10300	
10400		C -- 2 octaves down would be C/4
10500		C -- 3 octaves down would be C/8
10600		C -- 2 octaves up would be C*4
10700		C -- 3 octaves up would be C*8 etc.
10800	
10900	To test the use of these letters try:
11000	
11100		P3←C;PLAY;SIMP;FINISH;
11200	
11300	Now instrument SIMP will play middle C instead of A.   The left arrow
11400	(←)  indicates  that  the value of C has been placed in P3, replacing
11500	any value that was previously there.  (The left arrow and the  equals
11600	sign[=] are interchangeable in this program.)
11700	
11800	PLAY;SIMP;FINISH;  must  be typed so the new note will be computed.
11900	After it is first heard it may be repeated as indicated above.
12000	
12100	If frequencies other than those of  the  tempered  scale  are  to  be
12200	played, a number may be used instead of a letter.
12300	
12400		P3←1000;PLAY;SIMP;FINISH; will play a tone at 1000 hz.
12500	
12600	
12700	The amplitude scale available is the range of number from 0 to  2047.
12800	(This  upper  limit  is  set  by the number of bits [12] used for the
12900	sound samples.  See appendix.) P4 has been set at 1200 for  the  test
13000	tone.  This may be reset using the same method as described before.
13100	
13200		P4←100;P3←GS*2;PLAY;SIMP;FINISH;
13300	
13400	This will play a G# above the middle octave at amplitude 100.
13500	
13600	The duration of the tone may be changed be resetting P2.
13700	
13800		P2←.1; etc. will play a note of 1/10 sec. duration.
13900	
14000	If  longer  notes are desired the core being used must be expanded to
14100	allow for more storage space.    At  the  established  sampling  rate
14200	(10000,  see  appendix.)  3.33k  of core is needed for each second of
14300	sound.   Since 1/2" may be played when MUS10 has 10k, 14k  is  needed
14400	for   1 1/2",  17k  for  2 1/2",  20k for 3 1/2", etc.   (Methods for
14500	playing much longer examples are described in SCORE.MAN.)
14600	
14700	********** SETTING CORE SIZE *********
14800	
14900	To  increase  the  core  size type CALL, then C N where N is the core
15000	size desired.   Then type CON (=continue)  to  return  to  where  you
15100	previously were in the program.
15200	
15300	When several parameters are to  be  changed  at  once  the  following
15400	type-in format should be used:
15500	
15600		PLAY;SIMP 0 .2 FS/2 850;FINISH;
15700	
15800	This will play F# below middle C for 2/10" at an  amplitude  of  850.
15900	(Please  note  that  P5,  the  wave form for SIMP, will be dealt with
16000	later.)
16100	
16200	**********  COMMAS  **********
16300	
16400	Commas may be used to separate the parameters and if nothing precedes
16500	a  comma  the contents of that parameter remains unchanged.  Also any
16600	parameter numbers higher than the length of  the  list  will  not  be
16700	affected.
16800	
16900		PLAY;SIMP ,.3,,1200;FINISH;  changes only P2 and P4.
17000	
17100	******************************************************
17200	
17300	A string of notes may be played with the following input:
17400	
17500		PLAY;SIMP 0 .2 C 1500;SIMP .2,,D;SIMP .4,,E;
17600		 SIMP .6,,C;FINISH;
17700	
17800	In this case P1 must be updated for  each  note.  (Never  overlap  an
17900	instrument  with  itself.   Distortion  will  occur.)  P2,  the  note
18000	duration remains unchanged, so the commas suffice for the last  three
18100	notes.  P4, coming at the end of the list for  the  first  note  need
18200	only be stated once if it is not to change.
18300	
18400	Rests  are created by simply leaving some time between the end of one
18500	note (P1+P2) and the beginning of the next (the new P1).
18600	
18700		PLAY;SIMP 0 .2 C;SIMP .5;FINISH; will play C  for  2/10",
18800	rest for 3/10" and then play another C for 2/10".
18900	
19000	
19100	**********  FUNCTIONS  **********
19200	
19300	The  wave  form  in P5 is entered by means of a name which is used by
19400	the program to locate a  list,  or  array,  of  numbers  (512)  which
19500	describe  the wave.  The names used for this purpose will always be F
19600	followed  directly  by  a  number.    These  arrays  will  be  called
19700	"functions."
19800	
19900	Only  one  function  is  in  MUS10,  although more can be added.  The
20000	function present is known as F1 and describes a sine  wave.   To  see
20100	this wave on the CRT type:
20200	
20300		SEE(F1);
20400	
20500	To clear the screen hit the 'ESC' key followed by  a  'C'.  (This  is
20600	called ESCAPE C.)   <CR> will bring back the typescript display if it
20700	is gone.
20800	
20900	Functions may be created with an  external  program  called  FUNC  or
21000	within  MUS10  itself  by means of two routines called SYNTH and SEG.
21100	SYNTH is used to create composites made by adding  various  harmonics
21200	together.  The form of F1 could be changed in the following manner:
21300	
21400		SYNTH(F1); 1,1 2,1 3,.5 999;
21500	
21600	In the three pairs of numbers the first of each pair  represents  the
21700	harmonic  number  and  the  second  the  relative  amplitude  of that
21800	harmonic.   Thus the ratios of harmonics 1, 2 and 3 will be 1:1:.5 .
21900	
22000	The size of the second number of each pair is important only  in  its
22100	relation  to  the other amplitude numbers.  The number 999 is used to
22200	signal the termination of a string of entries.
22300	
22400	Several pairs may entered and harmonic numbers up to 256 may be  used
22500	but  in  practice  great  care  must be taken to avoid the "foldover"
22600	effect which  occurs  when  frequencies  higher  than  one  half  the
22700	sampling rate are present. (See appendix.)
22800	
22900	It should be pointed out that the fundamental (harmonic #1) need  not
23000	be present in a wave.
23100	
23200		SYNTH(F1); 10,1 12,1 15,1 999; will give the three notes of a
23300	minor chord.  After this has been entered the following will cause  a
23400	C minor chord to play:
23500	
23600		PLAY;SIMP 0 .5 GS/8;FINISH;
23700	
23800	While the lowest Ab (or G#) on the piano keyboard has been indicated,
23900	since  the wave form includes only the 10th, 12th and 16th harmonics,
24000	the notes middle C, Eb and G will be heard.
24100	
24200	Several  experiments  with  different  wave forms should be made.  Be
24300	sure to SEE the waves so a visual-aural connection might be made.
24400	
24500	A function may be changed in the middle of PLAY routine but  it  must
24600	be  noted that the new wave definition must follow! the note which it
24700	is to affect.
24800	
24900		In PLAY;SIMP 0 .3 D 1000;SIMP .3;SYNTH(F1); 1,.7  3,.2
25000		    5,.1  999;SIMP .6,,E;FINISH;  the newly defined wave
25100	     	will be heard in the second and third notes.
25200	
25300	
25400	If you wish to have several functions with different names  available
25500	and you do not create them with the FUNC program, their names must be
25600	"declared" to MUS10.  Suppose you wish to have F2, F3  and  F4.   You
25700	must type directly to MUS10 (or into an  EDIT file which will be read
25800	by MUS10) the following:
25900	
26000	   ARRAY F2,F3,F4(512);
26100	
26200	The "(512)" indicates that each function array will require 512 words
26300	of  storage.   Thus  at  this  point  the free storage left for sound
26400	samples has been reduced by 1 1/2K so you must increase the  size  of
26500	your  core  if  you  want  to have the same amount of playing time as
26600	before.
26700	
26800	The following example will play a sequence of notes wherein are heard
26900	the 10th, 14th and 18th harmonics of a low C, then the 10th, 13th and
27000	16th, and finally the 10th, 12th and 14th harmonics.
27100		As  each  SYNTH  function  is  typed  in  the  wave  will  be
27200	displayed.   If  you  wish  a  clear  screen  after  the last one has
27300	appeared, hit the 'ESC' key followed by a 'C'. (This is called ESCAPE
27400	C.)
27500	
27600		ARRAY F2,F3(512);
27700		SYNTH(F1);10,1 14,1 18,1 999;
27800		SYNTH(F2);10,1 13,1 16,1 999;
27900		SYNTH(F3);10,1 12,1 14,1 999;
28000		PLAY;SIMP 0 .3 C/4 2000 F1;
28100		SIMP .3,,,,F2;SIMP .6,,,,F3;FINISH;
28200	
28300	
28350	
28400		From this point on it would probably be better to prepare any
28500	input  for MUS10 which requires more than a couple of lines of typing
28600	with the SOS editor.  Typographical errors are inevitable and when an
28700	error  is made near the beginning of a string of input typed directly
28800	to MUS10 you most likely will have to retype everything.
     

00100	
00200	A type of flow-chart diagram for SIMP would appear as follows:
00300	
00400			 P4       MAG*P3
00500			  |         |
00600			  ↓         ↓
00700			***************
00800			*             *    OSCIL
00900			*             *    U1 (UNIT GENERATOR ONE)
01000		        *     P5      *
01100		         *           *
01200			  *         *
01300			   *********
01400			       |
01500			       ↓
01600			     *****
01700			    * OUT *
01800			    *  A  *
01900			     *****
02000	
02100	The top left input, P4, serves simply as a multiplier for the numbers
02200	found  in  the  wave  form array, P5.  The particular number from the
02300	array to be multiplied is determined by the number in the upper right
02400	input.   The  upper  right  input, in this case P3, when processed by
02500	"MAG" (the "magic" number) becomes the increment, the rate  at  which
02600	the  wave form array is stepped through.  The "magic" number is found
02700	by dividing the array length, 512, by the sampling rate, 10000.
02800	
02900	   512/SRATE=.0512 (Higher sampling rates will be discussed later.)
03000	
03100	The  maximum  size of the numbers in the wave array is + or -1.  Thus
03200	if P4 is set to 1000 the output of the OSCIL will be numbers  in  the
03300	range  +1000  to  -1000 which will describe the wave form put into P5
03400	cycling at the rate given in P3.
03500	
03600	
03700	The code for entering this instrument follows:
03800	
03900		COMPILE;
04000		INSTRUMENT SIMP;
04100		OSCIL(P4,MAG*P3,P5);
04200		OUTA←OUTA+U1;
04300		END;
04400		FINISH;
04500	
04600	Several instruments may appear between COMPILE; and FINISH;.
04700	
04800	
04900	This  instrument  has  only  one unit generator (the OSCIL) hence the
05000	output of U1 is added to the contents of OUTA.  If there are  several
05100	instruments  the  outputs  of all the instruments will be combined in
05200	OUTA for each sample.
05300	
05400	It will be noticed when playing instrument SIMP that the sound begins
05500	and ends quite abruptly.  This is because  no  attack-decay  envelope
05600	has been applied to the tone.  The sound begins at the full amplitude
05700	of P4 and remains at that level for  its  total  duration.
     

00100	
00200	To apply an envelope, another unit generator must be added.
00300	
00400	
00500			 P4       MAG/P2
00600			  |         |
00700			  ↓         ↓
00800			***************
00900			*             *    OSCIL
01000			*             *    U1 (UNIT GENERATOR ONE)
01100		        *     P5      *
01200		         *           *
01300			  *         *
01400			   *********
01500			       |
01600			       | 	 MAG*P3
01700			       |         |
01800			       ↓         ↓
01900			     ***************
02000			     *             *    OSCIL
02100			     *             *    U2 (UNIT GENERATOR TWO)
02200		             *     P6      *
02300		              *           *
02400			       *         *		COMPILE; 
02500			        *********  		INSTRUMENT TOOT;
02600			            |			OSCIL(P4,MAG/P2,P5);
02700			            ↓			OSCIL(U1,MAG*P3,P6);
02800			          *****			OUTA←OUTA+U2;
02900			         * OUT *		END;
03000			         *  A  *		FINISH;
03100			          *****
03200	
03300	Now that the instrument has been expanded you will note  that  it  is
03400	the output of unit generator two (U2) which goes to OUTA.
03500	
03600	P5 will now contain the envelope array.   This array is best  defined
03700	by the SEG routine.   SEG defines the positions of line segments used
03800	to approximate a curve.   With SEG several pairs of  numbers  may  be
03900	entered.   The first number of each pair is an amplitude, normally in
04000	the range of 0 to 1, and the second is the step number in the  array.
04100	The step numbers 1 through 100 are used in SEG.  (However internally,
04200	512 array locations are  used.)  Straight  line  segments  are  drawn
04300	between  each  of  the  points  defined.    The following would put a
04400	triangular envelope shape into F2:
04500	
04600		ARRAY F2(512);
04700		SEG(F2); 0,1  1,50  0,100;
04800	
04900	    Note that the routine is terminated when step 100 is reached.
05000	    DO NOT USE 999 with SEG.
05100	
05200	After having typed in the code for instrument TOOT and the definition
05300	for an  envelope  in F2, the following will produce a note using that
05400	envelope:
05500	
05600		SYNTH(F1);1,1  2,.4   3,.1 999;< Sets the tone color.
05700		PLAY;TOOT 0 .5 A 2000 F2 F1;FINISH;
05800	
05900	If two envelopes are to be contrasted add another function and define
06000	it.
06100		ARRAY F3(512);
06200		SEG(F3); 0,1  1,7  .2,25  .1,60  0,100;< Staccato
06300		PLAY;TOOT 0 .2 1000 2000 F3 F1;  < P5 has envelope
06400		TOOT .2 .5,,,F2;FINISH;<Plays stac. then sust.(F1 then F2)
06500	
     

00100	In the next example a unit generator will be added  above  the  right
00200	side  of  the  bottom,  tone producing unit generator.  In this way a
00300	function may be used to describe fluctuations  of  pitch  within  the
00400	duration  of  a  note  --  much  as  the  previous  example  gave the
00500	possibility for changing the amplitude during a single note.
00600	
00700	
00800					 MAG*P7-MAG*P3       MAG/P8
00900		 P4       MAG/P2		   |         |
01000		  |         |			   ↓         ↓
01100		  ↓         ↓			 *************** 
01200		***************			 *	       *   OSCIL
01300		*	      *	 OSCIL		 * 	       *   U2
01400		*             *  U1     	 *     P9      *
01500		*     P5      *      		  *           * 
01600	         *           * 			   *	     * 
01700	          *         * 			    *********
01800		   ********* 	   MAG*P3		|
01900		       |	       |   _____________|
02000		       |________      _↓___↓_
02100			       |      \     /
02200			       |       \ + /
02300			       |        \_/
02400			       |         |
02500			       ↓         ↓
02600			     ***************
02700			     *		   *
02800		     OSCIL   *             *
02900		     U3	     *     P6      *
03000		              *           * 
03100			       *         *    COMPILE; 
03200			        *********     INSTRUMENT GLISS;
03300			            |	      OSCIL(P4,MAG/P2,P5);
03400			            ↓	      OSCIL(MAG*P7-MAG*P3,MAG/P8,P9);
03500			          *****	      OSCIL(U1,MAG*P3+U2,P6);
03600			         * OUT *      OUTA←OUTA+U3; END; FINISH;
03700			         *  A  *
03800			          *****
03900	
04000	
04100	In order for this instrument to perform glissandos, a third  function
04200	must  be  defined  for P9 (the "shape" of the glissando).  A straight
04300	line slope will suffice for a simple glissando.  After typing in  the
04400	instrument definition set up the three functions.
04500	
04600		ARRAY F5,F6(512); <F1 is already present.
04700		SEG(F5);0,1  .8,7  1,12  1,90  0,100;<Envelope
04800		SEG(F6);0,1  1,100; <Slope
04900	
05000	In the preceding, the ARRAY declaration is needed only when some  new
05100	function names are to be used.
05200	
05300	The following will play a glissando up two octaves, from C to C*4.
05400	
05500		PLAY; GLISS 0 1 C 2000 F5  F1 C*4 1 F6; FINISH;
05600	
05700	If P8←.5; (while P2 remains at 1) two glissandos will be heard.
05800	
05900	
06000	This same instrument may be used to produce a vibrato  by  putting  a
06100	sine  wave into P9, setting P8←1/7; (the vibrato rate will be 7 times
06200	per second) and making P7 some very small amount different from P3.
06300	
06400		PLAY; GLISS 0 1 C 2000 F5  F1 C+2 1/7 F1; FINISH;
06500	
06600			(It is assumed that F1 is a sine wave.)
     

00100		Various types of noise  and  other  random  fluctuations  are
00200	produced  by the two random number unit generators.  These are called
00300	RANDH and RANDI.  RANDH (H=hold) produces in effect a  function  made
00400	up  of  horizantal  lines at various levels with a perpendicular jump
00500	from one level to the next.  There are  two  inputs  to  RANDH.   The
00600	first   (left  hand)  gives  the  range,  plus  or  minus,  of random
00700	selection and the second (right hand) gives the rate (per  second) at
00800	which the selections are to be made.
00900	
01000		Care  must  be  taken with the number in the first input.  If
01100	the number 100 is given, the output of RANDH will  fluctuate  between
01200	+100  and  -100.  Thus if a range of 100 to 200 is desired, the input
01300	number should be 50 and the number 150 must be added to the output.
01400	
01500	
01600					        MAG*P7     MAG*P8
01700		 P4       MAG/P2	           |         | 
01800		  |         |		           ↓         ↓
01900		  ↓         ↓			 *************** 
02000		***************			 *	       *   
02100		*	      *	 OSCIL		 *    RANDH    *   U2
02200		*             *  U1     	 ***************
02300		*     P5      *      		        |
02400	         *           * 			        |
02500	          *         * 			        | 
02600		   ********* 	   MAG*P3		|
02700		       |	       |   _____________|
02800		       |________      _↓___↓_
02900			       |      \     /
03000			       |       \ + /
03100			       |        \_/
03200			       |         |
03300			       ↓         ↓
03400			     ***************
03500			     *		   *
03600		     OSCIL   *             *
03700		     U3	     *     P6      *
03800		              *           * 
03900			       *         *    COMPILE; 
04000			        *********     INSTRUMENT NOISE;
04100			            |	      OSCIL(P4,MAG/P2,P5);
04200			            ↓	      RANDH(MAG*P7,MAG*P8);
04300			          *****	      OSCIL(U1,MAG*P3+U2,P6);
04400			         * OUT *      OUTA←OUTA+U3; END; FINISH;
04500			         *  A  *
04600			          *****
04700	
04800				ARRAY F2(512); <F1 is already present.
04900				SEG(F2);0,1  .8,7  1,12  1,90  0,100;<Env.
05000	
05100	
05200	
05300	
05400		The following will produce white noise.
05500	
05600		SRATE←25000;MAG←512/SRATE;SPEED←2;
05700		PLAY;NOISE 0 .5 C*8 1000 F2 F1 P3 P3*4;FINISH;
05800	
05900		Actually  P8 (given as P3*4) can probably be left at a number
06000	like 4000 for  noise  purposes.    As  P7  is  changed  the  apparent
06100	band-width  of  the  noise  will  be changed.  As the band-width gets
06200	narrower the center frequency becomes more apparent. Thus if P7←P3/16
06300	and  P3 is up in the range of C*8, something of the effect of blowing
06400	across an open tube will be produced.  The  pitch  is  clear  --  but
06500	quite windy.
06600	
06700		The  SRATE  (sampling  rate)  must  be  increased  for  noise
06800	production since very high frequencies are essential.  At SRATE←25000
06900	the high frequency cut-off will be at 12500 hz.
07000	
07100		If P8 is set to a  low  number  (e.g.  8)  individual  random
07200	pitches, instead of noise, will be produced at that rate.
07300	
07400	
07500		If the random unit generator  is  replaced  by  a  RANDI  the
07600	random  function  produced  will  be  made  up  of a series of slopes
07700	(I=interpolating) up and down from one random point to  another.   In
07800	the case of noise production there is little difference between RANDI
07900	and RANDH.  However RANDI is necessary for  getting  such  things  as
08000	random  vibrato.    The following will produce an acceptable, "human"
08100	sounding vibrato.
08200	
08300		PLAY; NOISE 0 1 C*2 1000 F2  F1 P3*.01 16; FINISH;
08400	
08500		The random rate of 16 per  second  (in  P8)  is  considerably
08600	faster  than  the  human  vibrato rate of 5 to 8 per second.  In this
08700	case however since  the  full  band-width  (in  P7)  is  only  seldom
08800	attained and the heard effect is that of a rate much slower than 16.
     

00100		Frequency modulation allows for  the  production  of  a  wide
00200	variety  of  tone  colors  using relatively little compute time.  The
00300	INTRP unit generator is really just a  combination of an OSCIL and an
00400	ADD box.  The left input represents the output when the function (P10
00500	below) is at zero and the right input represents the output when  the
00600	function  is  at  1  (peak  amplitude).   No time input is given with
00700	INTRP.  The speed of stepping through the function  array  is  always
00800	taken  as  being  P2,  i.e. the note duration.  In this case P10 will
00900	contain an envelope which  will  control  the  changes  in  frequency
01000	modulation.   For  a  full  explanation of FM see John Chowning's AES
01100	Journal article on this subject.
01200	
01300	
01400					 P9*P7*MAG    P8*P9*MAG
01500					      |         |
01600					      ↓         ↓
01700					    ***************
01800					     *           *
01900					      *   P10   *   INTRP
02000					       *       *    U2
02100						*     *
02200						 *   *
02300						  * *
02400					           *         P9*MAG
02500		 P4       MAG/P2		   |         |
02600		  |         |			   ↓         ↓
02700		  ↓         ↓			 *************** 
02800		***************			 *	       *   OSCIL
02900		*	      *	 OSCIL		 * 	       *   U3
03000		*             *  U1     	 *     P11     *
03100		*     P5      *      		  *           * 
03200	         *           * 			   *	     * 
03300	          *         * 			    *********
03400		   ********* 	   MAG*P3		|
03500		       |	       |   _____________|
03600		       |________      _↓___↓_
03700			       |      \     /
03800			       |       \ + /
03900			       |        \_/
04000			       |         |
04100			       ↓         ↓
04200			     ***************
04300			     *		   *
04400		     OSCIL   *             *
04500		     U4	     *     P6      *
04600		              *           * 
04700			       *         *    COMPILE; 
04800			        *********     INSTRUMENT FM;
04900			            |	      OSCIL(P4,MAG/P2,P5);
05000			            ↓	      INTRP(P7*P9*MAG,P8*P9*MAG,P10);
05100			          *****	      OSCIL(U2,P9*MAG,P11);
05200			         * OUT *      OSCIL(U1,U3+P3*MAG,P6);    
05300			         *  A  *      OUTA←OUTA+U4; END; FINISH;
05400			          *****
05500	
05600	
05700	
05800	    The following functions should be set up to test the FM instrument.
05900	
06000		ARRAY F1,F2,F3(512);
06100		SYNTH(F1); 1 1 999;   < A sine wave.
06200		SEG(F2);0,1  .9,4  1,8  1,72  .8,88  .5,95  0,100; < Envelope
06300		SEG(F3); 0,1  1,100;  < An upward slope or ramp.
06400	
06500		The following will produce a shift from a pure sine tone to a
06600	highly modulated tone over a period of 2 seconds.
06700	
06800		PLAY; FM 0 2 100 1000 F2   F1 0 10 100 F3  F1; FINISH;
06900	
07000	
07100		To reverse the procedure, i.e. change from the modulated tone
07200	to the pure tone, reverse the values of P7 and P8.
07300	
07400		P7←10; P8←0; PLAY;FM;FINISH;
07500	
07600	
07700		Change F3 (the ramp) to make the modulation  emerge  only  in
07800	the mid-part of the note.
07900	
08000		SEG(F3); 0,1  1,50  0,100;  < Makes a pyramid.
08100	
08200		PLAY;FM;FINISH;
08300	
08400		Try several of the variations suggested in Chowning's article.
     

00100	********** APPENDIX XXX NOT COMPLETE!!!XXX  ************
00200	
00300	The main program for sound generation is currently  called  MUSIC.FAI
00400	or MUSEXP.FAI (EXP=export).  The export version is designed to run on
00500	a standard PDP10 DEC system (which has a "FAIL" compiler.)
00600	
00700	The main program must be loaded with two  subroutine  packages  which
00800	are  called MUSF4.F4 (OR MUSEXP.F4) and MUSIO.FAI (or EXPIO.FAI.) The
00900	FORTRAN routines are for the creation  of  function  arrays  and  for
01000	organizing  the  output  of  sound samples to tape or disk after they
01100	have been computed.  The FAIL routines are for fast output of  blocks
01200	of samples.
01300	
01400	The STANFORD version can play sound from core or write all samples on
01500	an external device for playback with another program.     The  latter
01600	method is always used for sounds longer than about 10 seconds.
01700	
01800	See SCORE.LCS[UP,DOC] for information on longplaying features (RCDFLG
01900	and BIGBIT) and much other information.
02000	
02100	
02200	
02300	************** FILTER SETTINGS **********
02400	
02500		The  filter  switches  are  near the floor roughly behind the
02600	PDP6.  For the purposes of the tests described in this  document  the
02700	setting for channel 1, the right hand switch, should always be at 5K.
02800	This means that frequencies higher than 5000 hz will  be  suppressed.
02900	For  later  experiments with NOISE and FM it may be desired to change
03000	the setting to 12.5 K.  If this is done however sound  run  by  other
03100	users  at  the  lowest  sampling  rate  (10000,  SPEED 3) will always
03200	include the sampling tone of 5000 hz.  The switch at the top  of  the
03300	cabinet should be left at 5 K.
03400	
03500	
03600	
03700	************ LOCAL SPEAKERS ***********
03800	
03900	
04000		To  hear  sound  produced by the D-A converter from the small
04100	speaker associated with your TTY console hit the 'ESC'  key  followed
04200	by the '4', and then the 'U'. (ESCAPE 4 U).
     

00100	********* SOME INFO RE. THE 'FUNC' PROGRAM ***********
00200	
00300	CRUNCH:  Any two functions already in  a  single  .DAT  file  may  be
00400	"crunched" together.  Also, a function may be created by  either  the
00500	SEG  or  SYNTH  routines and then if instead of typing "F" for FINISH
00600	the letter "Z" is typed the program will jump immediately to "crunch"
00700	mode.   At  this  point  the  new  function  may be combined with any
00800	function found in the file presently in core.  Note however that once
00900	this new function  is  processed  by  any  of  "crunch"  options  its
01000	original  form  cannot be regained without going back to ordinary SEG
01100	or SYNTH mode.
01200	
01300	PLOTTING:  If "SP" (=see on the plotter) is  typed  single  functions
01400	can  be  drawn  on  the  Calcomp  plotter.   The size asked for is in
01500	inches. "SA" (=see all on plotter) will plot all the functions  found
01600	in  a single file. "SX" (=see all on the XGP) will draw all functions
01700	from  a  single  file in the proper size for printing by the XGP.  In
01800	order to use "SX" you must!!! follow the next steps exactly!!!
01900	
02000		Before running FUNC type: A DSK PTP <CR>. This will cause the
02100		instructions FUNC sends to the plotter to  be  written  in  a
02200		file on the disk.
02300	
03000		When  the  FUNC  program  finishes  then  type  R X <CR>.
03100		This runs a  program  called  X  which  converts  plotter 
03200		information to XGP commands.
03300	
03400		X will ask you 5 questions.  You should answer as follows:
03500	
03600			PLOT.BIN <CR>		(the file name)
03700			<CR>			(plot slice?)
03800			5  <CR>			(shift 5 inches)
03900			<CR>			(use default value of 11".)
04000			1  <CR>			(1 inch from the left)
04100			Y			(yes, delete the plot file)
04200	
04300	
04400	
     

00100	Information re. WAVES.   To run it type R WAVES.
00200	
00300	This will allow you to  display  the  actual  wave  shapes  of  sound
00400	computed  using RCDFLG←-1;.  The MUSAA.DMD file thus produced is read
00500	by WAVES.
00600	
00700	You may display up to 3072 samples at a  time  but  since  only  1024
00800	separate  positions  can be shown at once, larger  numbers will cause
00900	some samples to be skipped over (but with no great loss.) After  each
01000	group  of samples is displayed a <CR> will move on to the next group.
01100	If a number is typed, that will set the extent of the next group.  If
01200	the number -1 is given, the program will automatically cycle  through
01300	all available samples by groups of the last given number.   (When  no
01400	more samples  are to be found it will end with an error message.)  In
01500	order to make the program  go  backwards  type  any number less  than
01600	-2 for the number of samples you wish to back up.
01700	
01800	This  program  should be of use in seeing the wave shapes produced by
01900	amplitude and frequency modulation as well as seeing the  effects  of
02000	foldover,  etc.   Composite  waves  from  more  than one voice may be
02100	displayed but  as  the  complexity  increases  it  may  prove  rather
02200	difficult to glean useful information from what is seen.